﻿#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
#include "databaseopreate.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
    void on_deleteBtn_clicked();

    void on_addBtn_clicked();

    void on_updataBtn_clicked();
    void export_data();
    void fill_edit(int row, int column);
private:
    Ui::Widget *ui;
    QSqlDatabase db;
    QVector<uint32_t>index;
    int curSelect;
    void db_select();
signals:
    void send_operate_name( QString&str );
};
#endif // WIDGET_H
